using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Surface
{
    /// <summary>
    /// <para>HillShade</para>
    /// <para>Creates a shaded relief from a surface raster by considering the illumination source angle and shadows.</para>
    /// <para>通过考虑照明源角度和阴影，从表面栅格创建着色地貌。</para>
    /// </summary>    
    [DisplayName("HillShade")]
    public class HillShade : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public HillShade()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input surface raster.</para>
        /// <para>输入表面栅格。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output hillshade raster.</para>
        ///   <para>The hillshade raster has an integer value range of 0 to 255.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出山体阴影栅格。</para>
        ///   <para>山体阴影栅格的整数值范围为 0 到 255。</para>
        /// </xdoc></para>
        /// </param>
        public HillShade(object _in_raster, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "HillShade";

        public override string CallName => "3d.HillShade";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _azimuth, _altitude, _model_shadows.GetGPValue(), _z_factor];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input surface raster.</para>
        /// <para>输入表面栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output hillshade raster.</para>
        ///   <para>The hillshade raster has an integer value range of 0 to 255.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出山体阴影栅格。</para>
        ///   <para>山体阴影栅格的整数值范围为 0 到 255。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Azimuth</para>
        /// <para><xdoc>
        ///   <para>Azimuth angle of the light source.</para>
        ///   <para>The azimuth is expressed in positive degrees from 0 to 360, measured clockwise from north.</para>
        ///   <para>The default is 315 degrees.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>光源的方位角。</para>
        ///   <para>方位角以 0 到 360 的正度表示，从北顺时针测量。</para>
        ///   <para>默认值为 315 度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Azimuth")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _azimuth { get; set; } = 315;


        /// <summary>
        /// <para>Altitude</para>
        /// <para><xdoc>
        ///   <para>Altitude angle of the light source above the horizon.</para>
        ///   <para>The altitude is expressed in positive degrees, with 0 degrees at the horizon and 90 degrees directly overhead.</para>
        ///   <para>The default is 45 degrees.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>光源在地平线上方的高度角。</para>
        ///   <para>高度以正度表示，地平线为 0 度，头顶正上方为 90 度。</para>
        ///   <para>默认值为 45 度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Altitude")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _altitude { get; set; } = 45;


        /// <summary>
        /// <para>Model shadows</para>
        /// <para><xdoc>
        ///   <para>Type of shaded relief to be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The output raster only considers local illumination angles; the effects of shadows are not considered.
        ///     <para>The output values can range from 0 to 255, with 0 representing the darkest areas, and 255 the brightest. This is the default.</para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Checked—The output shaded raster considers both local illumination angles and shadows.
        ///     <para>The output values range from 0 to 255, with 0 representing the shadow areas, and 255 the brightest.</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要生成的着色地貌类型。</para>
        ///   <bulletList>
        /// <bullet_item>未选中 - 输出栅格仅考虑局部照明角度;不考虑阴影的影响。
        ///     <para>输出值的范围为 0 到 255，其中 0 表示最暗的区域，255 表示最亮的区域。这是默认设置。</para>
        ///     </bullet_item><para/>
        /// <bullet_item>选中 - 输出着色栅格同时考虑局部照明角度和阴影。
        ///     <para>输出值范围为 0 到 255，其中 0 表示阴影区域，255 表示最亮。</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Model shadows")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _model_shadows_value _model_shadows { get; set; } = _model_shadows_value._false;

        public enum _model_shadows_value
        {
            /// <summary>
            /// <para>NO_SHADOWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SHADOWS")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>SHADOWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SHADOWS")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Z factor</para>
        /// <para><xdoc>
        ///   <para>The number of ground x,y units in one surface z-unit.</para>
        ///   <para>The z-factor adjusts the units of measure for the z-units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.</para>
        ///   <para>If the x,y units and z-units are in the same units of measure, the z-factor is 1. This is the default.</para>
        ///   <para>If the x,y units and z-units are in different units of measure, the z-factor must be set to the appropriate factor or the results will be incorrect. For example, if the z-units are feet and the x,y units are meters, you would use a z-factor of 0.3048 to convert the z-units from feet to meters (1 foot = 0.3048 meter).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个曲面 z 单位中的地面 x，y 单位数。</para>
        ///   <para>当 z 单位与输入表面的 x，y 单位不同时，z 因子会调整它们的测量单位。在计算最终输出曲面时，输入曲面的 z 值乘以 z 因子。</para>
        ///   <para>如果 x，y 单位和 z 单位采用相同的测量单位，则 z 因子为 1。这是默认设置。</para>
        ///   <para>如果 x，y 单位和 z 单位采用不同的测量单位，则必须将 z 因子设置为适当的因子，否则结果将不正确。例如，如果 z 单位是英尺，x，y 单位是米，则使用 z 因子 0.3048 将 z 单位从英尺转换为米 （1 英尺 = 0.3048 米）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        public HillShade SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}